﻿<Window x:Class="EsGaceWPF.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:EsGaceWPF" 
    Title="EsGace" Height="750" Width="960" Background="#FF202020" MinWidth="640" MinHeight="480" Icon="/EsGaceWPF;component/SINEWAVE.ICO" WindowStyle="SingleBorderWindow" AllowsTransparency="False">

    <DockPanel x:Name ="rootPanel">
        <Border x:Name="headerBorder" BorderBrush="#FF535353" BorderThickness="0,0,0,1"
                DockPanel.Dock="Top" Padding="10,0,10,0" >
            <DockPanel LastChildFill="false">
                <Image DockPanel.Dock="Left" Height="50" Name="image2"  Source="/EsGaceWPF;component/Images/LogoEsGace.png"  />

                <Image  DockPanel.Dock="Right" Name="image1" Source="/EsGaceWPF;component/Images/Logo.png" Height="50" />
            </DockPanel>
        </Border>
        <Grid x:Name="mainGrid">
            <Grid.ColumnDefinitions >
                <ColumnDefinition Width="75*">
                </ColumnDefinition>
                <ColumnDefinition Width="25*">
                </ColumnDefinition>
            </Grid.ColumnDefinitions >
            <Grid x:Name="mainPane" Grid.Column="0" Margin="10">
                <Border x:Name="mainPaneBorder" BorderBrush="#FF535353" BorderThickness="1"
                        >
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.2,1.0" StartPoint="1.0,0.0">
                            <GradientStop Color="#FF202020" Offset="0"/>
                            <GradientStop Color="#FF545454" Offset="1"/>
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>
                <Grid x:Name="resultsPane">
                    <Grid.RowDefinitions >
                        <RowDefinition Height="*">
                        </RowDefinition>
                        <RowDefinition Height="Auto">
                        </RowDefinition>
                    </Grid.RowDefinitions >
                    <!-- Main Body -->
                    <Border x:Name="body"
                            Grid.Row="0">
                        <DockPanel LastChildFill="False">
                            <!-- Results -->
                            <TreeView x:Name="analyseResults"
                                      DockPanel.Dock="Top" Visibility="Visible" Background="#DDFFFFFF" Opacity="1"
                                      SelectedItemChanged="analyseResults_SelectedItemChanged"  >
                                <TreeView.Resources>
                                    <Style TargetType="{x:Type TreeViewItem}">
                                        <Setter Property="HeaderTemplate">
                                            <Setter.Value>
                                                <DataTemplate>
                                                    <StackPanel Orientation="Horizontal">

                                                        <Image Name="img"  Width="16" Height="16" Stretch="Fill" 
                                                               Source="{Binding
                                                                RelativeSource={RelativeSource 
                                                                Mode=FindAncestor, 
                                                                AncestorType={x:Type TreeViewItem}}, 
                                                                Path=Tag,
                                                                Converter={x:Static local:HeaderToImageConverter.Instance  }}"       
                                                               />
                                                        <TextBlock Text="{Binding}" Margin="5,0"
                                                                   VerticalAlignment="Center"/>
                                                    </StackPanel>
                                                </DataTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </TreeView.Resources>

                            </TreeView>
                        </DockPanel>

                    </Border>
                    <!-- Footer Area -->
                    <Border x:Name="footer"
                            Background="#FF000000"
                            BorderBrush="#FF535353"
                            BorderThickness="1,0,1,1"
                            Padding="10"
                            Visibility="Collapsed"
                            Grid.Row="1"
                            >
                        <Grid  >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0"
                                       FontSize="16"
                                       FontWeight="Bold"
                                       Foreground="#FFFFFFFF" VerticalAlignment="Center">
                                Analyzing...
                            </TextBlock>
                            
                            <TextBlock Grid.Column="1" Padding="15,0,15,0" x:Name="progressionText"
                                       FontSize="12"
                                       Foreground="#FFFFFFFF" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Height="14.483" HorizontalAlignment="Left">
                                
                            </TextBlock>
                            <Button Grid.Column="2"  x:Name="analyzeCancel"
                                    Content="Cancel"
                                    HorizontalAlignment="right"
                                    Margin="0,-1.963,0,0"  Width="39.893" VerticalAlignment="Center" Click="analyzeCancel_Click" />
                          
                        </Grid>
                    </Border>
                </Grid>
            </Grid>
            <GridSplitter/>
            <DockPanel x:Name="detailsPanel" Grid.Column="1" Margin="10">
                <Border x:Name="controlPanelHeader"
                        Background="#FF000000"
                        DockPanel.Dock="Top"
                        BorderBrush="#FF535353"
                        BorderThickness="1,1,1,0"
                        Padding="10">
                    <TextBlock FontSize="16" FontWeight="Bold"
                               Foreground="#FFFFFFFF"
                               Text="Control Panel"/>
                    
                </Border>
                <Border x:Name="controlPanelBody"
                        BorderBrush="#FF535353"
                        BorderThickness="1,1,1,1"
                        DockPanel.Dock="Top">
                    <Border.Background>
                        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,.5">
                            <GradientStop Color="#FF545454" Offset="0"/>
                            <GradientStop Color="#CC202020" Offset="1"/>

                        </LinearGradientBrush>

                    </Border.Background>
                    <DockPanel LastChildFill="False">
                        <Border x:Name="demoPanel" DockPanel.Dock="Top">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.504,0.351" StartPoint="0.504,-0.319">
                                    <GradientStop Color="#FF000000" Offset="0.416"/>
                                    <GradientStop Color="#FF236542" Offset="0.54"/>


                                </LinearGradientBrush>
                            </Border.Background>
                            <StackPanel HorizontalAlignment="Stretch" Margin="10">
                                <TextBlock FontSize="16"
                                           FontWeight="Bold"
                                           Foreground="#FFFFFFFF"
                                           Text="Analyze"/>
                                <Border BorderBrush=" #FF6573A0"
                                        BorderThickness="0,1,0,0"
                                        Margin="0,10,0,0">
                                    <StackPanel>
                                        <DockPanel >
                                            <Label DockPanel.Dock="Left" Content="_Elapsed Time:" Foreground="White"/>
                                                <Label x:Name="elapsedTime" DockPanel.Dock="Right" Content="" Foreground="White"/>

                                        </DockPanel>
                                       
                                        
                                        <ProgressBar x:Name="progression" IsIndeterminate="False" Height="10" />
                                        
                                    </StackPanel>
                                </Border>
                                <Border BorderBrush="#FF6573A0"
                                        BorderThickness="0,1,0,0"
                                        Margin="0,10,0,0">
                                    <StackPanel Orientation="Horizontal"
                                                Margin="0,10,0,0">
                                        <Button x:Name="complete"
                                                        Content="_Complete"
                                                        Margin="0,0,5,0"
                                                        Width="60" IsDefault="True" Click="complete_Click" />
                                        <Button          x:Name="partial"
                                                         Content="_Partial"
                                                        Width="60" IsEnabled="False" />
                                    </StackPanel>
                                                
                                        
                                    
                                </Border>
                                        
                                           
                            </StackPanel>
                        </Border>
                    </DockPanel>
                </Border>
                <Border x:Name="detailsPanelBody"
                        BorderBrush="#FF535353"
                        BorderThickness="1,1,1,1"
                        DockPanel.Dock="Top">
                    <Border.Background>
                        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,.5">
                            <GradientStop Color="#FF545454" Offset="0"/>
                            <GradientStop Color="#CC202020" Offset="1"/>

                        </LinearGradientBrush>

                    </Border.Background>
                    <DockPanel LastChildFill="False">
                        <Border x:Name="itemsDetailsPanel" DockPanel.Dock="Top"
                                 BorderThickness="1,0,1,1">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.504,0.351" StartPoint="0.504,-0.319">
                                    <GradientStop Color="#FF000000" Offset="0.416"/>
                                    <GradientStop Color="#FF4A5790" Offset="0.54"/>

                                </LinearGradientBrush>
                            </Border.Background>
                            <StackPanel HorizontalAlignment="Stretch" Margin="10">
                                <TextBlock FontSize="16"
                                           FontWeight="Bold"
                                           Foreground="#FFFFFFFF"
                                           Text="Details"/>
                                <Border BorderBrush=" #FF6573A0"
                                        BorderThickness="0,1,0,0"
                                        Margin="0,10,0,0">
                                    <StackPanel>
                                        <DockPanel LastChildFill="True"  >
                                            <Label DockPanel.Dock="Left"  Content="_Name:" Foreground="White"/>
                                            <TextBlock  DockPanel.Dock="Right" 
                                                        HorizontalAlignment="Right" 
                                                        VerticalAlignment="Center" >
                                                <Hyperlink Foreground="LightGray">
                                                    Open...
                                                </Hyperlink>
                                            </TextBlock>

                                        
                                        </DockPanel>
                                        
                                        <TextBox x:Name="itemName" IsReadOnly="True" Background="#11FFFFFF" BorderBrush="Transparent" Opacity="1" Foreground="WhiteSmoke"></TextBox>
                                        <DockPanel LastChildFill="True"  >
                                            <Label DockPanel.Dock="Left"  Content="_Folder:" Foreground="White"/>
                                            <TextBlock  DockPanel.Dock="Right" 
                                                        HorizontalAlignment="Right" 
                                                        VerticalAlignment="Center" >
                                                <Hyperlink Foreground="LightGray" >
                                                    Open...
                                                </Hyperlink>
                                            </TextBlock>

                                        
                                        </DockPanel>
                                        <TextBox x:Name="itemFolder" IsReadOnly="True" Background="#11FFFFFF" BorderBrush="Transparent" Opacity="1" Foreground="WhiteSmoke"></TextBox>
                                        <Label Content="_Size:" Foreground="White"/>
                                        <TextBox x:Name="itemSize" IsReadOnly="True" Background="#11FFFFFF" BorderBrush="Transparent" Opacity="1" Foreground="WhiteSmoke"></TextBox>

                                    </StackPanel>
                                </Border>
                                <Border BorderBrush="#FF6573A0"
                                        BorderThickness="0,1,0,0"
                                        Margin="0,10,0,0">
                                    
                                                
                                        
                                    
                                </Border>
                                        
                                           
                            </StackPanel>
                        </Border>
                    </DockPanel>
                    
                </Border>
                <Border x:Name="StatsPanelBody"
                        BorderBrush="#FF535353"
                        BorderThickness="1,1,1,1"
                        DockPanel.Dock="Top" Visibility="Collapsed">
                    <Border.Background>
                        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,.5">
                            <GradientStop Color="#FF545454" Offset="0"/>
                            <GradientStop Color="#CC202020" Offset="1"/>

                        </LinearGradientBrush>

                    </Border.Background>
                    <DockPanel LastChildFill="False" IsItemsHost="False">
                        <Border x:Name="statsPanel" DockPanel.Dock="Top"
                                 BorderThickness="1,0,1,1">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.504,0.351" StartPoint="0.504,-0.319">
                                    <GradientStop Color="#FF000000" Offset="0.416"/>
                                    <GradientStop Color="DarkRed" Offset="0.54"/>

                                </LinearGradientBrush>
                            </Border.Background>
                            <StackPanel HorizontalAlignment="Stretch" Margin="10">
                               
                                <TextBlock FontSize="16"
                                           FontWeight="Bold"
                                           Foreground="#FFFFFFFF"
                                           Text="Statistics"/>
                                <Border BorderBrush=" #FF6573A0"
                                        BorderThickness="0,1,0,0"
                                        Margin="0,10,0,0">
                                    <StackPanel>
                                        <DockPanel LastChildFill="True"  >
                                            <Label DockPanel.Dock="Left"  Content="_Name:" Foreground="White"/>
                                            <TextBlock  DockPanel.Dock="Right" 
                                                        HorizontalAlignment="Right" 
                                                        VerticalAlignment="Center" >
                                                <Hyperlink Foreground="LightGray">
                                                    Open...
                                                </Hyperlink>
                                            </TextBlock>

                                        
                                        </DockPanel>
                                        
                                        <TextBox x:Name="itemName2" IsReadOnly="True" Background="#11FFFFFF" BorderBrush="Transparent" Opacity="1" Foreground="WhiteSmoke"></TextBox>
                                        <DockPanel LastChildFill="True"  >
                                            <Label DockPanel.Dock="Left"  Content="_Folder:" Foreground="White"/>
                                            <TextBlock  DockPanel.Dock="Right" 
                                                        HorizontalAlignment="Right" 
                                                        VerticalAlignment="Center" >
                                                <Hyperlink Foreground="LightGray" >
                                                    Open...
                                                </Hyperlink>
                                            </TextBlock>

                                        
                                        </DockPanel>
                                        <TextBox x:Name="itemFolder2" IsReadOnly="True" Background="#11FFFFFF" BorderBrush="Transparent" Opacity="1" Foreground="WhiteSmoke"></TextBox>
                                        <Label Content="_Size:" Foreground="White"/>
                                        <TextBox x:Name="itemSize2" IsReadOnly="True" Background="#11FFFFFF" BorderBrush="Transparent" Opacity="1" Foreground="WhiteSmoke"></TextBox>

                                    </StackPanel>
                                </Border>
                                <Border BorderBrush="#FF6573A0"
                                        BorderThickness="0,1,0,0"
                                        Margin="0,10,0,0">
                                    
                                                
                                        
                                    
                                </Border>
                                        
                                           
                            </StackPanel>
                        </Border>
                    </DockPanel>

                </Border>
            </DockPanel>
        </Grid>

    </DockPanel>

</Window>
